package thread;

public class WithdrawThread implements Runnable {
	private Account account;
	public WithdrawThread(Account acc) {
		this.account = acc;
	}
	@Override
	public void run() {
		account.withdraw(300);
	}

	
	public static void main(String[] args) throws InterruptedException {
		Account acc = new Account();
		for (int i = 0; i < 10; i++) {
			Thread t = new Thread(new WithdrawThread(acc));
			t.start();
		}
		Thread.sleep(2000);
		acc.GetMoney();
	}
	
}
